#include <iostream>
#include <math.h>
using namespace std;

int main() {
    float sum = 0;
    float a = 1.0;
    float b;
    int i = 0;
    while(a <= 10000000){
        b = pow(-1.0,i) / a;
        sum = sum + b;
        a += 2.0;
        i++;
//        cout << "sum = " << sum << endl;
//        cout << "a = " << a << endl;
//        cout << "b = " << b << endl;
    }

    float result = sum * 4.0;
    cout << "result = " << result << endl;
    
    return 0;
}
